﻿using System.Collections.ObjectModel;
using System.Xml.Serialization;

namespace ElectronicCommerce.Framework.Web.Configuration.Resource
{
    public class Javascript
    {
        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlAttribute("fileName")]
        public string FileName { get; set; }

        [XmlAttribute("ued")]
        public bool UED { get; set; }

        [XmlAttribute("inHtmlHead")]
        public bool InHtmlHead { get; set; }
    }

    public class JavascriptCollection : KeyedCollection<string, Javascript>
    {
        protected override string GetKeyForItem(Javascript item)
        {
            return item.Name.ToUpper();
        }
    }
}
